package org.dromara.common.translation.core.impl;

import lombok.AllArgsConstructor;
import org.apache.dubbo.config.annotation.DubboReference;
import org.dromara.bclt.api.RemoteCourseService;
import org.dromara.common.translation.annotation.TranslationType;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.common.translation.core.TranslationInterface;

/**
 * 设备用户昵称翻译实现
 *
 * @author RRyuan
 */
@AllArgsConstructor

@TranslationType(type = TransConstant.COURSE_ID_TO_NAME)
public class CourseTranslationImpl implements TranslationInterface<String> {

    @DubboReference
    private RemoteCourseService remoteCourseService;


    @Override
    public String translation(Object key, String other) {
        System.out.println(key.toString());
        return remoteCourseService.selectCourseNameById((Long) key);

    }
}
